#include <iostream>
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
using namespace std;

void* threat_start(void* arg)
{
    printf("i am work\n");
    while(1){
        sleep(1);
    }
    return NULL;
}
int main()
{
    pthread_t pt;
    int ret = pthread_create(&pt, NULL, threat_start, NULL);  
    if(ret != 0){
        perror("pthread_create");
        return 0;
    }

    pthread_join(pt, NULL);
    printf("i will end\n");
    return 0;
}
